package com.itheima.mapper;

import com.itheima.pojo.Dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 部门管理
 */
@Mapper
public interface DeptMapper {
    @Select("select * from dept")
    public List<Dept> setAll();

    @Delete("delete from dept where id=#{id}")
    public int delById(Integer id);

    @Insert("insert into dept values (null,#{name},#{createTime},#{updateTime})")
    @Options(useGeneratedKeys = true,keyProperty = "id")
    int insertDept(Dept dept);
}
